package tgc.edu.tms.entity;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Transient;

@Entity
public class Student extends SysUser{
	private String sex;			//性别
	private String age;			//年龄
	private String phone;		//电话
	private String email;		//邮箱
	private	String addrs;		//地址
	private String job;			//职务
	private	TbClass tbClass;
	
	
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public String getAge() {
		return age;
	}
	public void setAge(String age) {
		this.age = age;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getAddrs() {
		return addrs;
	}
	public void setAddrs(String addrs) {
		this.addrs = addrs;
	}
	public String getJob() {
		return job;
	}
	public void setJob(String job) {
		this.job = job;
	}
	@ManyToOne
	public TbClass getTbClass() {
		return tbClass;
	}
	public void setTbClass(TbClass tbClass) {
		this.tbClass = tbClass;
	}
	/***
	 * 
	 * @获取班级名称
	 */
	@Transient
	public String getTbclass() {
		return tbClass==null?null:tbClass.getName();
	}
	@Transient
	public String getProfesion() {
		return tbClass==null?null:tbClass.getProfession().getProfesion();
	}
	@Transient
	public String getYear() {
		return tbClass==null?null:tbClass.getProfession().getYear();
	}
}
